home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Doco ƒ / CSMP ƒ / CSMP-V1-055.TXT < prev    next >
Encoding:
Text File  |  1992-06-03  |  40.0 KB  |  1,007 lines

  1. C.S.M.P. Digest             Mon, 20 Apr 92       Volume 1 : Issue 55
  2.  
  3. Today's Topics:
  4.  
  5.     Alternative Mac programming languages?
  6.     making a backup "template" of THINK C project ?
  7.     mem/proc-manager, heapzone?
  8.     THINK C wish - tags?
  9.     Comm Toolbox Code Snippets?
  10.     How do I plot icons?
  11.     Think C 5.0.2 and MacTCP DNR...
  12.     Where do I submit my freeware app?
  13.     Programmer furniture
  14.  
  15.  
  16. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  17.  
  18. These digests are available (by using FTP, account anonymous, your email
  19. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  20. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  21. Questions list.  The last several issues of the digest are available from
  22. sumex-aim.stanford.edu as well.
  23.  
  24. These digests are also available via email.  Just send a note saying that you
  25. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  26. automatically receive each new digest as it is created.
  27.  
  28. The articles in these digests are taken directly from comp.sys.mac.programmer.
  29. They are not edited; all articles included in this digest are in their original
  30. posted form.  The only articles that are -not- included in these digests are
  31. those which didn't receive any replies (except those that give information
  32. rather than ask a question).  All replies to each article are concatenated
  33. onto the original article in the order in which they were received.  Article
  34. threads are not added to the digests until the last article added to the
  35. thread is at least one month old (this is to ensure that the thread is dead
  36. before adding it to the digests).
  37.  
  38. Send administrative mail to mkelly@cs.uoregon.edu.
  39.  
  40. -------------------------------------------------------
  41.  
  42. From: Brad Taplin <btaplin@silver.ucs.indiana.edu>
  43. Subject: Alternative Mac programming languages?
  44. Organization: Indiana University
  45. Date: Sun, 8 Mar 1992 09:08:26 -0500
  46.  
  47. Hello,
  48.  
  49.     I have been swimming into the deep dark waters of
  50.     C programming and have begun to wonder if there's
  51.     another language that might provide for both fast
  52.     prototyping and complete, tight coding for the Mac.
  53.  
  54.     In the world of Microsoft Windows (gasp!) a common
  55.     approach is to prototype in Visual Basic then code
  56.     in something more powerful, usually C. The makers
  57.     of Smalltalk/V suggest that applications written
  58.     with their product can be prototyped in a day, and
  59.     then reworked into powerful programs incrementally
  60.     without the sacrifice of that first day's coding.
  61.  
  62.     Is this true? Is there something comparable in 
  63.     the Mac world? It seems that although C functions
  64.     and now classes provide for modularity, debugging
  65.     and integration of these into main() remains too
  66.     painful and time-consuming for easy prototyping 
  67.     or quick rewrites. Wanna tinker without headaches.
  68.  
  69.     Apologies to all you power-hackers. I do respect
  70.     the amazing capabilities of C, but imagine it
  71.     better suited to systems work and power-coding
  72.     than to my experimental programming on a micro.
  73.  
  74. +++++++++++++++++++++++++++
  75.  
  76. From: steve@oceania.com (Steve Dakin)
  77. Organization: Oceania Health Care Systems
  78. Date: Tue, 10 Mar 92 01:04:05 GMT
  79.  
  80. In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu> Brad Taplin  
  81. <btaplin@silver.ucs.indiana.edu> writes:
  82.  
  83. >     I have been swimming into the deep dark waters of
  84. >     C programming and have begun to wonder if there's
  85. >     another language that might provide for both fast
  86. >     prototyping and complete, tight coding for the Mac.
  87.  
  88. Stepstone recently announced Objective-C for the Macintosh.  I have found it  
  89. successfully addresses the points you mentioned: "fast prototyping and  
  90. complete, tight coding."  You might want to check it out.  Stepstone can be  
  91. reached at: 1-800-289-6253 (1-800-BUY-OBJECT for those of you who like letters  
  92. in your phone numbers).
  93. - -- 
  94.     Steve Dakin                        Oceania Health Care Systems 
  95.  steve@oceania.com (NeXT mail)         Palo Alto, CA (415) 322-0127
  96.  jester@oceania.com              Cogito ergo sum un fanaticus Marillionus
  97.         All the best freaks are here: go09+freaks@andrew.cmu.edu
  98.  
  99. +++++++++++++++++++++++++++
  100.  
  101. From: gregf@shaman.sps.mot.com (Greg Ferguson)
  102. Date: 9 Mar 92 23:50:20 GMT
  103. Organization: Motorola Semiconductor Products Sector
  104.  
  105. In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu> Brad Taplin  
  106. <btaplin@silver.ucs.indiana.edu> writes:
  107. > Hello,
  108. >     I have been swimming into the deep dark waters of
  109. >     C programming and have begun to wonder if there's
  110. >     another language that might provide for both fast
  111. >     prototyping and complete, tight coding for the Mac.
  112. >     In the world of Microsoft Windows (gasp!) a common
  113. >     approach is to prototype in Visual Basic then code
  114. >     in something more powerful, usually C. The makers
  115. >     of Smalltalk/V suggest that applications written
  116. >     with their product can be prototyped in a day, and
  117. >     then reworked into powerful programs incrementally
  118. >     without the sacrifice of that first day's coding.
  119. >     Is this true? Is there something comparable in 
  120. >     the Mac world? It seems that although C functions
  121. >     and now classes provide for modularity, debugging
  122. >     and integration of these into main() remains too
  123. >     painful and time-consuming for easy prototyping 
  124. >     or quick rewrites. Wanna tinker without headaches.
  125. >     Apologies to all you power-hackers. I do respect
  126. >     the amazing capabilities of C, but imagine it
  127. >     better suited to systems work and power-coding
  128. >     than to my experimental programming on a micro.
  129.  
  130. You could use HyperCard. I like it for prototyping. Also, Prograph might  
  131. work for that purpose. It's a compiled language so you could go with the  
  132. Prograph front end and use C or Pascal for the code chunks that need to be  
  133. lean 'n mean.
  134.  
  135. Thats just my thoughts.
  136.  
  137. Greg
  138.  
  139. +++++++++++++++++++++++++++
  140.  
  141. From: rfl@oddjob.uchicago.edu (Bob Loewenstein)
  142. Date: 10 Mar 92 15:18:50 GMT
  143. Organization: U. of Chicago, Astronomy and Astrophysics
  144.  
  145.  
  146. >       I have been swimming into the deep dark waters of
  147. >       C programming and have begun to wonder if there's
  148. >       another language that might provide for both fast
  149. >       prototyping and complete, tight coding for the Mac.
  150.  
  151. You might want to check out Yerk or Mops, true alternative languages
  152. for the mac. They both are available through anonymous ftp at
  153. oddjob.uchicago.edu  in directory pub/Yerk.
  154.  
  155. Both are related to Neon, the object oriented Forthlike language for
  156. the mac. Development is very fast. Yerk is threaded interpreted while
  157. Mops is threaded subroutine. Mops' speed of execution is as fast
  158. as C, while Yerk is more like Forth...about 2-3x slower than c.
  159.  
  160. +++++++++++++++++++++++++++
  161.  
  162. From: ksand@apple.com (Kent Sandvik)
  163. Date: 13 Mar 92 02:44:12 GMT
  164. Organization: MacDTS Mongols
  165.  
  166. In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu>,
  167. btaplin@silver.ucs.indiana.edu (Brad Taplin) writes:
  168. > Hello,
  169. >     I have been swimming into the deep dark waters of
  170. >     C programming and have begun to wonder if there's
  171. >     another language that might provide for both fast
  172. >     prototyping and complete, tight coding for the Mac.
  173. >     In the world of Microsoft Windows (gasp!) a common
  174. >     approach is to prototype in Visual Basic then code
  175. >     in something more powerful, usually C. The makers
  176. >     of Smalltalk/V suggest that applications written
  177. >     with their product can be prototyped in a day, and
  178. >     then reworked into powerful programs incrementally
  179. >     without the sacrifice of that first day's coding.
  180.  
  181. Finally a question I would gladly like to answer! Forget Visual
  182. Basic - if Microsoft answer to MIS prototyping is Basic, then
  183. it clearly shows what kind of grand vision this company has in mind 
  184. concerning future software development.
  185.  
  186. The three languages/systems I would recommend to check out are:
  187.  
  188. Smalltalk/V. Yes the MacOS version is behind the Windows one, but
  189. this will change soon.
  190.  
  191. MCL - even if the cost is high, 495$US, it's cheap compared with
  192. the Windows Common Lisp offerings. Learning CLOS is a good way
  193. to get prepared for future dynamic object oriented languages.
  194.  
  195. Serius/Prograph. Both are visual languages, and have their followers.
  196. Anyway, these two are good candidates concerning true visual
  197. programming (Visual-Basic :-) ).
  198.  
  199. Anyway,also check out Gambit, a nice Scheme for MacOS including 
  200. a kit for writing code modules. Also SIOD (Scheme in one Defun)
  201. is a way to implement a small Scheme interpreter inside an application
  202. framework which could be used for a small language interpreter.
  203.  
  204. Note that in many cases you could write modules in C/C++, and then
  205. glue them together using a dynamic language. I personally think this 
  206. is the best approach, you will get both better performance, and rapid
  207. prototyping and testing.
  208.  
  209. Hope this helps,
  210. Kent
  211.  
  212. - --
  213. Kent Sandvik - Apple DTS  - Dynamic Language Evangelist
  214. ksand@apple.com
  215. All opinions expressed are my own, and not related to any company or
  216. organization. Happy, happy, joy, joy!
  217.  
  218. +++++++++++++++++++++++++++
  219.  
  220. From: John Lacey <johnl@spinner.cs.indiana.edu>
  221. Organization: Computer Science, Indiana University
  222. Date: Fri, 13 Mar 1992 13:51:30 -0500
  223.  
  224. ksand@apple.com (Kent Sandvik) writes:
  225.  
  226. >Anyway,also check out Gambit, a nice Scheme for MacOS including 
  227. >a kit for writing code modules.
  228.  
  229. Fwiw, I've used lot's of Schemes, and Gambit is the buggiest of them
  230. all.  MacScheme is much better, and more expensive, but the student
  231. edition is only $40.
  232.  
  233. - -- 
  234. John Lacey,                  How can I do this? I don't know; and because I do
  235. johnl@whale.cs.indiana.edu   not know, I shall make the attempt.  e e cummings
  236.  
  237. +++++++++++++++++++++++++++
  238.  
  239. From: podenski@bcsaic.UUCP (Patrick Podenski)
  240. Date: 16 Mar 92 17:40:02 GMT
  241. Organization: Boeing Computer Services AI Center, Seattle
  242.  
  243. In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu> btaplin@silver.ucs.indiana.edu (Brad Taplin) writes:
  244. >Hello,
  245. >
  246. >    I have been swimming into the deep dark waters of
  247. >    C programming and have begun to wonder if there's
  248. >    another language that might provide for both fast
  249. >    prototyping and complete, tight coding for the Mac.
  250. >
  251. >    Is this true? Is there something comparable in 
  252. >    the Mac world? It seems that although C functions
  253. >    and now classes provide for modularity, debugging
  254. >    and integration of these into main() remains too
  255. >    painful and time-consuming for easy prototyping 
  256. >    or quick rewrites. Wanna tinker without headaches.
  257. >
  258.  
  259. There is hope for the problems you describe. The answer is
  260. Prograph. Prograph is a visual programming language. It is
  261. object-oriented, has a powerful user interface builder, a
  262. completely integrated language environment with the most
  263. powerful debugging tools I have used.
  264.  
  265. You can drop down and write C routines when that appeals,
  266. but Prograph can access the entire Mac toolbox, supports
  267. AppleEvents, and can twiddle bits if you want to.
  268.  
  269. TGS (The Gunakara Systems), makers of Prograph, also
  270. sell separate tools for easily integrating standard C,
  271. Pascal or Fortran code into a Prograph application.
  272. The Prograph environment includes both an interpreter
  273. and a compiler, so you produce standalone Mac
  274. applications.
  275.  
  276. Initially, learning to program in a visual programming
  277. environment can be a challenge, because it is quite
  278. different than the traditional textual coding
  279. environments.
  280.  
  281. You can order the product from places like MacConnection
  282. for the usual mail order prices.
  283. The vendor is
  284.  
  285. TGS Systems
  286. 2745 Dutch Village Road, Suite 200
  287. Halifax, Nova Scotia
  288. B3L4G7
  289. Canada
  290. Phone (902) 455-4446
  291.  
  292. +++++++++++++++++++++++++++
  293.  
  294. From: tlt38517@uxa.cso.uiuc.edu (Terry Thiel)
  295. Date: 18 Mar 92 14:24:28 GMT
  296. Organization: University of Illinois at Urbana
  297.  
  298. podenski@bcsaic.UUCP (Patrick Podenski) writes:
  299. >In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu> btaplin@silver.ucs.indiana.edu (Brad Taplin) writes:
  300. >>    I have been swimming into the deep dark waters of
  301. >>    C programming and have begun to wonder if there's
  302. >>    another language that might provide for both fast
  303. >>    prototyping and complete, tight coding for the Mac.
  304. >There is hope for the problems you describe. The answer is
  305. >Prograph. Prograph is a visual programming language. It is
  306. >object-oriented, has a powerful user interface builder, a
  307. >completely integrated language environment with the most
  308. >powerful debugging tools I have used.
  309. >You can order the product from places like MacConnection
  310. >for the usual mail order prices.
  311. >TGS Systems
  312. >2745 Dutch Village Road, Suite 200
  313. >Halifax, Nova Scotia
  314. >B3L4G7
  315. >Canada
  316. >Phone (902) 455-4446
  317. They also have an educational discount.  Call TGS for details.
  318. - -Terry
  319. .
  320.  
  321. ---------------------------
  322.  
  323. From: dunigan@thdsun.epm.ornl.gov (Tom Dunigan)
  324. Subject: making a backup "template" of THINK C project ?
  325. Date: 16 Mar 92 15:48:36 GMT
  326. Organization: Oak Ridge National Laboratory
  327.  
  328. Is there a way to make a copy of one's THINK C project file without
  329. all the compiled pieces and libraries included -- i.e., just a small
  330. template of the sources and libraries needed plus compiler/language settings ...?
  331. or a way to "unbuild" the project?
  332. or a description of the project file format, so one could write such a utility?
  333.  
  334. This would be useful for distributing sources of a THINK C application,
  335. or for recovering from a bug that has destroyed your project file.
  336. - -- 
  337.     Tom Dunigan
  338.     dunigan@msr.epm.ornl.gov
  339.  
  340. +++++++++++++++++++++++++++
  341.  
  342. From: Daryl_Spitzer@mindlink.bc.ca (Daryl Spitzer)
  343. Date: 16 Mar 92 18:33:27 GMT
  344. Organization: MIND LINK! - British Columbia, Canada
  345.  
  346. > Is there a way to make a copy of one's THINK C project file without
  347. > all the compiled pieces and libraries included -- i.e., just a small
  348. > template of the sources and libraries needed plus compiler/language settings
  349. > ...?
  350. > or a way to "unbuild" the project?
  351.  
  352. Have you tried "Remove Objects" in the Project Menu?
  353.  
  354. Since projects can become corrupted, I keep a backup with the objects removed,
  355. just in case.
  356. - --
  357. - -------------------------------------------------------------------
  358.  Daryl_Spitzer@mindlink.bc.ca     "Life isn't just, life just is."
  359.          a2251@mindlink.bc.ca              -- Me  (I think.)
  360.        Spitzer@UNCAMULT.BITNET
  361. - -------------------------------------------------------------------
  362.  
  363. +++++++++++++++++++++++++++
  364.  
  365. From: bpb9204@tamsun.tamu.edu (Brent)
  366. Date: 19 Mar 92 04:34:01 GMT
  367. Organization: Texas A&M Univ., Inc.
  368.  
  369. dunigan@thdsun.epm.ornl.gov (Tom Dunigan) writes:
  370. |Is there a way to make a copy of one's THINK C project file without
  371. |all the compiled pieces and libraries included -- i.e., just a small...
  372. |or a way to "unbuild" the project?
  373.  
  374. Yes, you can first make a copy of the project via the Finder, and then
  375. in Think C you can do a "Remove Objects" command from the Project menu(?).
  376. This leaves JUST the basic info needed to rebuild the project and a large
  377. project with 20-30 source files may shrink to about 20k.
  378.  
  379. |This would be useful for distributing sources of a THINK C application,
  380. |or for recovering from a bug that has destroyed your project file.
  381.  
  382. Yep.  
  383.  
  384. As an aside, in my Apple menu (Sys 7), I have an option called "Dev Tools"
  385. which is a folder containing my assorted development stuff.  In there I
  386. have created a basic Think C project with the ANSI and MacTraps libraries.
  387. The file is a stationary pad so when I need a new project, I just select
  388. that file and away I go...
  389.  
  390. - -Brent
  391. - -- 
  392. - ------------------------------------------------------------------------------
  393. Brent P. Burton, N5VMG                                    Computer Sci/Physics
  394. bpb9204@tamsun.tamu.edu                                   Texas A&M University
  395. - ------------------------------------------------------------------------------
  396.  
  397. ---------------------------
  398.  
  399. From: t.g.finstad@fys.uio.no (Terje Finstad)
  400. Subject: mem/proc-manager, heapzone?
  401. Date: 17 Mar 92 15:32:50 GMT
  402. Organization: Fysisk Institutt
  403.  
  404. I want to get some general information about how to manipulate the data of 
  405. application A from application B under system 7.
  406.  
  407. I have had a lot use for extending the capabillities of commercial applicat-
  408. - -ions by writing my own Deskaccessories that manipulates the data structures
  409. of the the Application opening the DA. I have found the data structures I
  410. want by searching through the application's master pointers. Well, of course,
  411. it is the DA that finds the data once (during writing the DA) I have under-
  412. - -stood the application's organization of it's data. ( Sometimes one may of 
  413. course be so lucky that the application can put the datastructures of interest
  414. into the scrap - then there is no problems neither under system 6 nor 7 ). 
  415. The DA may also use some of the application's routines by calling routines 
  416. from the applications jump table. (once I understand these routines) These 
  417. DA's do not work under system 7.  
  418.  
  419. There must be a way to just modify what I have of code and still using it.  
  420. In what general direction should I head?.  Can I use the process manager to 
  421. get  another application's  heapzone?.  If I could get it's heapzonepointer 
  422. I would get it's data. (I  think?)  Any hint's would be appreciated.
  423.  
  424.  Sincerely 
  425.           Terje Finstad  
  426.  
  427. +++++++++++++++++++++++++++
  428.  
  429. From: orpheus@reed.edu (P. Hawthorne)
  430. Date: 18 Mar 92 09:51:39 GMT
  431. Organization: Reed College, Portland OR
  432.  
  433.  
  434.   t.g.finstad@fys.uio.no (Terje Finstad) writes:
  435. . I want to get some general information about how to manipulate the data of 
  436. . application A from application B under system 7.
  437.  
  438.   I know that the Dreaded Thought Police have made it seem like you can't
  439. do anything because it may change in the future, but in this case, you
  440. may actually be tampering with forces beyond your control.
  441.   Not to rain on your parade here, or anything, but this seems like a
  442. doomed effort unless you can adapt to every new version of the system,
  443. the apps involved, and the architectures of the Macintosh itself.
  444.   Do not expect to be able to address memory across application
  445. boundaries. Think of it as being in one country, and trying to spy into
  446. another without going there. Handle your interprocess communication with
  447. a messenger of some sort, whether it be network entities or extentions.
  448.  
  449. . I have had a lot use for extending the capabillities of commercial applicat-
  450. . ions by writing my own Deskaccessories that manipulates the data structures
  451. . of the the Application opening the DA. 
  452.  
  453.   I guess this could be done, but have never had enough courage to spend any
  454. time on it. Since the slightest whim of a compiler could blow you out of the
  455. water, I would imagine that you would need to make this an entirely in house
  456. productivity trick. Even at this point, I find it easier to work within the
  457. confines of the operating system. Get the applications in question to respond
  458. to menu choices and play with their window structures, and try and stay away
  459. from stuff that changes from compile to compile...
  460.  
  461. . I have found the data structures I want by searching through the
  462. . application's master pointers. Well, of course, it is the DA that finds
  463. . the data once (during writing the DA) I have understood the
  464. . application's organization of it's data. 
  465.  
  466.   You should get a title like reverse engineer or something. Have you found
  467. that there are any applications which are easier to figure out than others?
  468.  
  469. .(Sometimes one may of course be so lucky that the application can put the
  470. . datastructures of interest into the scrap - then there is no problems
  471. . neither under system 6 nor 7).  
  472.  
  473.   How do you selectively retrieve what is on the clip? Do you stick to well
  474. defined standards like PICT and TEXT? Can you preserve the clip so that the
  475. user never notices what has happened once you are done?
  476.  
  477. . The DA may also use some of the application's routines by calling
  478. . routines from the applications jump table. (once I understand these
  479. . routines) These DA's do not work under system 7.
  480.  
  481.   This sounds like a phenomenal way to get inside things and play around.
  482. Pardon my naivete, but doesn't this crash intermittantly with a 68020 or
  483. better, regardless of what the system version is?
  484.  
  485. . There must be a way to just modify what I have of code and still using
  486. . it. In what general direction should I head?.  Can I use the process
  487. . manager to get  another application's  heapzone?.  If I could get it's
  488. . heapzonepointer I would get it's data. (I  think?)  Any hint's would be
  489. . appreciated.
  490.  
  491.   Code is like an apartment or a significant other. Every once and a
  492. while, it's nice to start all over again. Copy and paste your code into
  493. new projects which do not depend upon the layout of the heap zone, since
  494. that could wipe out your project in the near future.
  495.   Look at ways to make INITs that patch system traps. There are some fine
  496. examples of that around, such as Adobe Typeface Manager and Suitcase. Get
  497. those, tear them apart, and see what you think.
  498.   I must say, it sounds like you could do a great job at it.
  499.  
  500.   Theus (orpheus@reed.edu)
  501.  
  502. +++++++++++++++++++++++++++
  503.  
  504. From: t.g.finstad@fys.uio.no (Terje Finstad)
  505. Organization: Dept. Physics
  506. Date: Wed, 18 Mar 1992 19:22:00 GMT
  507.  
  508.   orpheus@reed.edu (P. Hawthorne) writes:
  509. >   t.g.finstad@fys.uio.no (Terje Finstad) writes:
  510. > . I want to get some general information about how to manipulate the data of 
  511. > . application A from application B under system 7.
  512.  
  513. Request for suggestions still applies,
  514. allthough P. Hawthorne seems to suggest to forget it?
  515.  
  516. > doomed effort unless you can adapt to every new version of the system,
  517. > the apps involved, and the architectures of the Macintosh itself.
  518.  
  519. Well, so far these things/"the effort" has been working from the system of 85
  520. up till sys. 6.07. 
  521.  
  522. > . I have had a lot use for extending the capabillities of commercial applicat-
  523. > . ions by writing my own Deskaccessories that manipulates the data structures
  524. > . of the the Application opening the DA. 
  525. >   I guess this could be done, but have never had enough courage to spend any
  526. > time on it. Since the slightest whim of a compiler could blow you out of the
  527. > water, I would imagine that you would need to make this an entirely in house
  528. > productivity trick. Even at this point, I find it easier to work within the
  529. > confines of the operating system. Get the applications in question to respond
  530.  
  531. Calling the memory manager to get the applications heapzone is working
  532. within the operating system.
  533.  
  534. >   You should get a title like reverse engineer or something. Have you found
  535. > that there are any applications which are easier to figure out than others?
  536.  
  537. No comments
  538.  
  539. >  1 How do you selectively retrieve what is on the clip? 2 Do you stick to well
  540. > defined standards like PICT and TEXT? 3 Can you preserve the clip so that the
  541. > user never notices what has happened once you are done?
  542.  
  543. 1. Well, as you know, you choose the Restype yourself in GetScrap.
  544. 2. No
  545. 3. Well I am also the user. But, yes, changing the scrap requires the applications
  546.    do not assume what they placed there will always be what they get back, but there
  547.    does not seem to be a problem( I call ZeroScrap in between get and put, and the
  548.    application is supposed to think the scrap has changed, but from my limited
  549.    experience these/my applications do not assume the scrap is unchanged anyhow.        
  550.  
  551. > . ..using routines from the application's jumptable 
  552. > Pardon my naivete, but doesn't this crash intermittantly with a 68020 or
  553. > better, regardless of what the system version is?
  554.  
  555. No, not by the different CPU's but whether anything like that can be done (easily)
  556. with system 7 - I have no idea and part of my original request. 
  557.  
  558. >   Code is like an apartment or a significant other. Every once and a
  559.  
  560. OK I'm ready for the junkyard
  561.  
  562.  
  563. ---------------------------
  564.  
  565. From: hankin@sauron.osf.org (Scott Hankin)
  566. Subject: THINK C wish - tags?
  567. Organization: Open Software Foundation
  568. Date: 17 Mar 92 16:29:24 GMT
  569.  
  570.     As interesting as the C++ discussion has been, my needs are more
  571.     mundane.  Many times I find myself working with a system of many files,
  572.     and THINK C gives me a message that a particular function call does not
  573.     match the prototype.  I am then left to try and find that prototype,
  574.     and correct the offending line.
  575.  
  576.     On Unix, this process is greatly simplified by the use of tags files.
  577.     A tags file is created by running a relatively dumb program over one or
  578.     more source files.  Information is collected on global variable
  579.     definitions, function definitions, typedefs and macros.  The editor can
  580.     then take you to the file that defined a given variable or function and
  581.     position the cursor on the appropriate line.  It is much faster than
  582.     any automated file search (.e.g. grep, multi-file search) because the
  583.     information is already in an easily searched format.
  584.  
  585.     However, the compiler has all this information and then some.  It can
  586.     do this job far better than a separate utility.  It's just a matter of
  587.     collecting the information, and providing an interface to the editor.
  588.  
  589.     This touches upon a second unfortunate feature of THINK C.  I really
  590.     like the feature which provides you with a list of all the include
  591.     files seen when compiling a particular file.  The list is only
  592.     available after the file has been successfully compiled, however.  This
  593.     is frustrating because it is often useful to have that list to aid in
  594.     tracking down errors in the file.  Often I get one of those prototype
  595.     mismatches, but have to try and search down the file containing the
  596.     prototype manually.  This wastes a lot of time.  It is particularly
  597.     annoying because I know that at the point at which the error occurs,
  598.     all the include files have in fact been read.
  599.  
  600.     As a colleague of mine is so fond of saying, "It's just a simple matter
  601.     of programming..."
  602.  
  603.     Does anyone else work this way?
  604.  
  605. - - Scott
  606. Scott Hankin (hankin@osf.org)
  607. Open Software Foundation
  608. 11 Cambridge Center
  609. Cambridge, MA 02142
  610.  
  611. +++++++++++++++++++++++++++
  612.  
  613. From: pete@medea.rice.edu (Louis Wu)
  614. Organization: Whatsamatta U
  615. Date: Tue, 17 Mar 1992 23:14:25 GMT
  616.  
  617.  
  618. The Alpha text editor create tags for function declarations and has a list
  619. dialog that allows you to jump to the declaration. However, it doesn't do
  620. prototype declarations.
  621.  
  622. - --
  623. =============================================================================
  624. Pete Keleher   "Relax! Don't worry! Have a homebrew!"        pete@cs.rice.edu
  625. =============================================================================
  626.  
  627.  
  628. +++++++++++++++++++++++++++
  629.  
  630. From: spencer@panix.com (David Spencer)
  631. Date: Wed, 18 Mar 1992 12:57:19 GMT
  632. Organization: PANIX Public Access Unix, NYC
  633.  
  634. In <hankin.700849764@osf> hankin@sauron.osf.org (Scott Hankin) writes:
  635.  
  636. >[I] like the feature which provides you with a list of all the include
  637. >    files seen when compiling a particular file.  The list is only
  638. >    available after the file has been successfully compiled, however.
  639.  
  640. create a file called dummy.c that #includes all your .h files, but
  641. nothing else; then compile it. All the .h's are then available by
  642. option-clicking the title bar of the project window.
  643.  
  644. >Open Software Foundation
  645.  
  646. I won't report you to rms.
  647.  
  648. David Spencer      spencer@panix.com
  649.  
  650. ---------------------------
  651.  
  652. From: speth@cats.ucsc.edu (James Gustave)
  653. Subject: Comm Toolbox Code Snippets?
  654. Date: 18 Mar 92 02:22:17 GMT
  655. Organization: University of California, Santa Cruz
  656.  
  657.  
  658.   Does anyone have the little bits of code from the beginning of Inside the
  659. Macintosh Communications Toolbox??  I really don't feel like typing them in
  660. if I don't have to :)
  661.  
  662.   Actually any little snippets of code using the Comm Toolbox would be great.
  663. Thanks.
  664.  
  665. - -- 
  666. Jim Speth
  667. speth@cats.ucsc.edu
  668.  
  669. +++++++++++++++++++++++++++
  670.  
  671. From: zobkiw@world.std.com (Joe Zobkiw)
  672. Date: 18 Mar 92 16:21:26 GMT
  673. Organization: The World Public Access UNIX, Brookline, MA
  674.  
  675. You should get a hold of the "CShell" source from the Developer CD...it
  676. does some comm toolbox stuff and contains full C source.
  677.  
  678. It's probably on ftp.apple.com also.
  679.  
  680. <joe>
  681.  
  682.  
  683. - -- 
  684. <--------------------------------------------------->
  685.  joe zobkiw                     zobkiw@world.std.com
  686.  mac.synthesis.MIDI.development.C.asm.communications
  687. >---------------------------------------------------<
  688.  
  689. ---------------------------
  690.  
  691. From: bakker@fwi.uva.nl (Harry Bakker (I87))
  692. Subject: How do I plot icons?
  693. Date: 18 Mar 92 13:55:35 GMT
  694. Organization: FWI, University of Amsterdam
  695.  
  696.  
  697. Greetings to all the rescue rangers!
  698.  
  699. The Mac introduced to the world a windows oriented system, complete with icons.
  700. So you would think icons are heavilly supported. Well, I think not.
  701. Fer example: I wanted to fetch the drive-icon of a floppydisk. So I called
  702. PBControl with csCode = 22 (I think that's the number, but since I'm doing
  703. this by head, it could be uncorrect. However, I my program it's ok). This call
  704. is supposed to give me a Ptr to an icon structure (bitmap and mask). The trouble
  705. starts when I try to plot the icon. The PlotIcon routine wants a HANDLE, but I
  706. got a PTR. So I converted the pointer to a handle, by passing the ADDRESS of
  707. the pointer to PlotIcon. Well, it did plot something, but it sure didn't look
  708. like a proper icon. To make the problem worse, there are a lot of other routines
  709. (for example the desktop database routines) that all return POINTERS to icons.
  710.  
  711. Now my question: could somebody help me at this point? How do I plot an icon,
  712. if I only have a POINTER to it?
  713.  
  714. Thanks in advance.
  715.  
  716. Harry Bakker
  717. (bakker@fwi.uva.nl)
  718.  
  719. +++++++++++++++++++++++++++
  720.  
  721. From: potts@itl.itd.umich.edu (Paul Potts)
  722. Organization: Instructional Technology Laboratory, University of Michigan
  723. Date: Wed, 18 Mar 92 15:12:43 GMT
  724.  
  725. bakker@fwi.uva.nl writes:
  726.  
  727. >Greetings to all the rescue rangers!
  728. >
  729. >The Mac introduced to the world a windows oriented system, complete with icons.
  730. >So you would think icons are heavilly supported. Well, I think not.
  731.  
  732. "I think not?" The Macintosh is highly icon- and window-oriented.
  733. This is a pretty presumptuous statement, given that your entire evidence
  734. for this seems to be a bug in your program that you can't figure out.
  735.  
  736. >... The trouble
  737. >starts when I try to plot the icon. The PlotIcon routine wants a HANDLE, but I
  738. >got a PTR. So I converted the pointer to a handle, by passing the ADDRESS of
  739. >the pointer to PlotIcon. 
  740.  
  741. You can't do this. A Handle is an operating system object. Simply taking the
  742. address of a pointer and calling it a handle won't do. The Operating System
  743. didn't create this object - how would it know the size of the object,
  744. who it belongs to, whether it is locked or unlocked, purgeable or nonpurgeable,
  745. etc.? Take a look at Inside Macintosh. Trying to program the Mac without a
  746. basic knowledge of the memory manager is also rather presumptuous...
  747.  
  748. >Now my question: could somebody help me at this point? How do I plot an icon,
  749. >if I only have a POINTER to it?
  750.  
  751. Inside Macintosh volume 2, p. 375:
  752.  
  753. PtrToHand (srcPtr: Ptr; VAR dstHandl: Handle; size: LONGINT): OSERR;
  754.  
  755. Pass this routine your pointer and the number of bytes that you wish
  756. to copy (in the "size" parameter). In C you could pass as the size
  757. parameter (long)sizeof(your pointer).  Remember to dispose of the
  758. handle when you are done with it. You could also use PtrToXHand, if
  759. you have created the handle ahead of time.
  760.  
  761.  
  762. - -- 
  763.          -Paul Potts-potts@itl.itd.umich.edu- 
  764. "The amounts of nicotine that are tolerated by adult smokers can produce
  765. symptoms of poisoning and could prove fatal if Habitrol systems are applied
  766. or ingested by children or pets." - Habitrol(TM) drug ad, information sheet.
  767.  
  768. ---------------------------
  769.  
  770. From: jack@umbio.med.miami.edu (Jack Herrington)
  771. Subject: Think C 5.0.2 and MacTCP DNR...
  772. Date: 18 Mar 92 20:07:27 GMT
  773. Organization: University of Miami Medical School
  774.  
  775. Just to start off, I'd like to say 'Thanks' for all the help in the past...
  776. You are a really cool bunch of people for responding so quickly with 
  777. valuable information.
  778.  
  779. Now, on to the real story.  Today's Problem:  OpenResolver(nil) and
  780. CloseResolver() work fine, or at least I think the do, the respond with
  781. 'noErr'.  This is after I re-compiled the dnr.o with MPW C to remove
  782. the 'TrapAvaliable' which is multiply defined.
  783.  
  784. When I use 'StrToAddr' with all the right parameters, it returns back
  785. with 'CacheFault' (ok, I can buy that).  And so I loop (right now I am
  786. just in the testing phase, so it's ok to loop infitely).  My callback
  787. breaks me about about half a second later with a rtnCode of '-1'.  The
  788. cname it gives me is the name I give it 'umbio', plus the domain
  789. '.med.miami.edu' but with two bytes of crap at the beginning.  ALSO,
  790. the address return is 0L, so it didn't get it.
  791.  
  792. So should the string passed to 'StrToAddr' be pascal?  It seems to just
  793. hang when I send a 'C' string.  It's a dumb question I know, but when
  794. faced with a 'wall' of weirdness you have to try weird things to get
  795. around it.
  796.  
  797. Anyway, thanks for any helpful advice you can give me.
  798. - -- 
  799. "Electric word 'life', it means forever and that's a might long time.  But I'm
  800.  here to tell yah, there's something else... The after-life, a word of
  801.  never-ending happiness, you can always see the sun, day or night.  So when you
  802.  call up that shrink in Beverly hills, you know the one, Dr. everything-we-all-
  803.  
  804. +++++++++++++++++++++++++++
  805.  
  806. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  807. Organization: University of Illinois at Urbana
  808. Date: Wed, 18 Mar 1992 22:23:14 GMT
  809.  
  810. jack@umbio.med.miami.edu (Jack Herrington) writes:
  811.  
  812. >When I use 'StrToAddr' with all the right parameters, it returns back
  813. >with 'CacheFault' (ok, I can buy that).  And so I loop (right now I am
  814. >just in the testing phase, so it's ok to loop infitely).  My callback
  815. >breaks me about about half a second later with a rtnCode of '-1'.  The
  816. >cname it gives me is the name I give it 'umbio', plus the domain
  817. >'.med.miami.edu' but with two bytes of crap at the beginning.  ALSO,
  818. >the address return is 0L, so it didn't get it.
  819.  
  820. The rtnCode field in hostInfo is delcared as int. In MPW, that's
  821. a long; in THINK C, that is (usually) a short. Change the type
  822. in AddressXlation.h to long and you will be fine.
  823.  
  824. pr
  825. - --
  826. Pete Resnick             (...so what is a mojo, and why would one be rising?)
  827. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  828. System manager - Cognitive Science Group, Beckman Institute, UIUC
  829. Internet: resnick@cogsci.uiuc.edu
  830.  
  831. ---------------------------
  832.  
  833. From: a-giles@uchicago.edu (Aaron Giles)
  834. Subject: Where do I submit my freeware app?
  835. Organization: University of Chicago High Energy Physics
  836. Date: Wed, 18 Mar 1992 23:06:17 GMT
  837.  
  838. Well, I finally put everything together and am now ready to release my
  839. first Mac application to the cruel real world.  I remember hearing
  840. once that there was some way to get it posted to the majors (info-mac,
  841. UMich, UTexas) as well as put up on comp.binaries.mac all in one fell
  842. swoop, but I can't for the life of me remember how that worked.
  843. Either that, or it was all in a dream I once had. :-) If the latter
  844. case is true, then I'd appreciate a description of the usual
  845. formalities involved in posting directly to these sources.
  846.  
  847. Thanks a million!  
  848. Aaron 
  849. - -----
  850.                      Aaron Giles -- a-giles@uchicago.edu
  851.            "You can't have everything ... where would you put it?"
  852.  
  853. +++++++++++++++++++++++++++
  854.  
  855. From: triantos@acsu.buffalo.edu (Nick B Triantos)
  856. Date: 19 Mar 92 04:49:46 GMT
  857. Organization: The University at Buffalo
  858.  
  859. If I remember correctly, the FAQ says that mailing it to
  860. macgift@rascal.ics.utexas.edu, probably compressed with either StuffIt or
  861. Compact Pro, binhexed, and with a brief description at the top, will get
  862. distribution to sumex, rascal, umich, and comp.binaries.mac...
  863.  
  864. Nice to hear it's freeware, BTW!
  865.  
  866. - -Nick
  867.  
  868. - --
  869. Nick Triantos   Grad Student, University at Buffalo.  Why?  I DON'T KNOW!
  870.      "...and besides, she's a psycho hose-beast." - Wayne, from Wayne's World
  871.  
  872. I! Hi'm a mtatng siugnaturei vir*ss. You cann~t reisth elping me  spre]d !
  873.  
  874. ---------------------------
  875.  
  876. From: gmarzot@mitre.org (G. S. Marzot (Joe))
  877. Subject: Programmer furniture
  878. Date: 4 Mar 92 18:43:18 GMT
  879. Organization: The MITRE Corporation
  880.  
  881. This is not a joke.  I was just wondering if there was any particular 
  882. chair that programmers find saticfactory. for example the kneeling style 
  883. chair or anything else that releives the strain of sitting in front of a 
  884. terminal for extended time periods. Thanks for any input, GSM
  885.  
  886.  
  887. Email: gmarzot@linus.mitre.org
  888.  
  889. (standard  disclaimer)
  890.  
  891. - -------------------------
  892.  
  893. From: sje@xylos.ma30.bull.com (Steven J. Edwards)
  894. Date: 5 Mar 92 22:05:31 GMT
  895. Organization: Bull HN, Worldwide Information Systems, Billerica, Mass., USA
  896.  
  897. In article <1992Mar4.184318.12569@linus.mitre.org> gmarzot@mitre.org (G. S. Marzot (Joe)) writes:
  898. > This is not a joke.  I was just wondering if there was any particular 
  899. > chair that programmers find saticfactory. for example the kneeling style 
  900. > chair or anything else that releives the strain of sitting in front of a 
  901. > terminal for extended time periods. Thanks for any input, GSM
  902. >
  903. > Email: gmarzot@linus.mitre.org
  904.  
  905.     You are correct: it is not a joke.
  906.  
  907.     I have tried a good number of programmer's chairs over the
  908. last two decades including the two platform kneeler, the fixed back,
  909. the two axis tilt, and so forth.  I have settled upon a straight and
  910. flat back, forward to rearward single axis tilt, four wheel caster
  911. with three-quarter length armrests.  The chair back reaches up to
  912. about three-fifths of my spine.  All contact surfaces are slightly
  913. padded and have a smooth vinyl finish.  Of course, chair height,
  914. caster resistance, and the tilt resistance are adjustable.  The chair
  915. remains stable in all by the most outrageous tilt positions and has a
  916. comfortable lean-back stability point.  It is somewhat broader in the
  917. beam than I am to allow for a bit of relaxing lateral movement.  I
  918. have two desks in my home office and I can easily propel the chair
  919. from one to the other while remaining seated.
  920.  
  921.     A good chair is expensive, but my current home chair is in its
  922. eighth year and is still going strong.  Ten minutes a year is
  923. sufficient for maintenance, mostly lubrication and cleaning the
  924. bearings.  It is possible that its replacement may have a higher back.
  925. There is also the problem of occasional stubbed toes due to the long
  926. caster arm supports, this from usually programming at home shoeless.
  927. The chair at work is similar.
  928.  
  929.     I have not seen any good programmer's chairs for less than
  930. about US$250 nowadays.  
  931.  
  932.  [The above opinions expressed are my own; not necessarily held by others.]
  933.       == Steven J. Edwards           Bull HN Information Systems Inc. ==
  934.       == (508) 294-3484              300 Concord Road         MS 820A ==
  935.       == sje@xylos.ma30.bull.com     Billerica, MA 01821          USA ==
  936. "That Government which Governs the Least, Governs Best." -- Thomas Jefferson
  937.  
  938. - -------------------------
  939.  
  940. From: orpheus@reed.edu (P. Hawthorne)
  941. Date: 5 Mar 92 21:24:27 GMT
  942. Organization: Reed College, Portland OR
  943.  
  944.  
  945.   gmarzot@mitre.org (G. S. Marzot (Joe)) writes:
  946. : I was just wondering if there was any particular chair that programmers
  947. : find satisfactory. For example, the kneeling style chair or anything else
  948. : that releives the strain of sitting in front of a terminal for extended
  949. : time periods.
  950.  
  951.   I find it best to move chairs around depending on what I am doing. It's
  952. the ultimate cop out, I know. Everything seems to depend on what you're
  953. doing, but it makes sense that chairs have their uses too. Plus, I enjoy
  954. the ritualist aspect of rolling another chair over.
  955.  
  956.   If I am writing new sections of code, I prefer secretarial chairs on
  957. swivels without arm rests so that I can twist and turn to reach books or
  958. the stereo. For analysis and testing, with their relatively long periods of
  959. quiet contemplation, I prefer a comfy chair with arm rests.
  960.  
  961.   I don't like the kneeling style chairs, even the ones on wheels. For me,
  962. anyway, they get irritating after a couple of hours because they are just
  963. transferring strain to your legs rather than your spine. Imagine kneeling
  964. for hours at a time. I prefer to sit.
  965.  
  966.   Theus (orpheus@reed.edu)
  967.  
  968. +++++++++++++++++++++++++++
  969.  
  970. From: biesty@ide.com (Bill Biesty)
  971. Date: 18 Mar 92 02:45:02 GMT
  972. Organization: IDE, San Francisco
  973.  
  974. In article <1992Mar4.184318.12569@linus.mitre.org> gmarzot@mitre.org 
  975. (G. S. Marzot (Joe)) wants to know what kind of chair is best for 
  976. programming for long periods of time.
  977.  
  978. I prefer a chair that tilts back and forth on the seat. the ones that
  979. just angle the back are cheaper but are not comfortable when 
  980. leaning back. Arm rests are optional. (Sometimes they encourage bad
  981. posture, but they help shift weight off of the back and rear end.)
  982.  
  983. Get durable padding in the seat. It's hard to get a chair with 
  984. good padding without spending a ton on other not so useful features. 
  985. But I have a chair now that I start to feel the bolts by the end 
  986. of the day.
  987.  
  988. I've tried the two platform chairs. I didn't find them confortable
  989. since I could not adjust the angles of the platforms.
  990.  
  991. - --
  992. Bill Biesty
  993. <biesty@ide.com>     These are not the opinions of my employer.
  994.  
  995. ---------------------------
  996.  
  997. End of C.S.M.P. Digest
  998. **********************
  999.